package com.fcscs.cservice.dao;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Repository;

import com.fcscs.cservice.common.CServiceCommonEnums.EditableCategoryEnum;
import com.fcscs.cservice.common.CServiceCommonEnums.NotifType;
import com.fcscs.cservice.common.CServiceCommonEnums.TemplateType;
import com.fcscs.cservice.domain.AuthenticationConfig;
import com.fcscs.cservice.domain.ConstantsLanguageValue;
import com.fcscs.cservice.domain.Country;
import com.fcscs.cservice.domain.ExpressCheckInConfig;
import com.fcscs.cservice.domain.FieldEditability;
import com.fcscs.cservice.domain.HouseKeepingConfig;
import com.fcscs.cservice.domain.IGuestUserProfileView;
import com.fcscs.cservice.domain.IGuestUserView;
import com.fcscs.cservice.domain.InterfaceConfig;
import com.fcscs.cservice.domain.InterfaceConfiguration;
import com.fcscs.cservice.domain.Language;
import com.fcscs.cservice.domain.Nationality;
import com.fcscs.cservice.domain.NotifDestination;
import com.fcscs.cservice.domain.NotifTemplate;
import com.fcscs.cservice.domain.PaymentMethod;
import com.fcscs.cservice.domain.PropertyConfiguration;
import com.fcscs.cservice.domain.RoomStatus;
import com.fcscs.cservice.domain.State;
import com.fcscs.cservice.domain.Title;
import com.fcscs.cservice.domain.model.CheckInConfiguration;
import com.fcscs.cservice.domain.model.CheckOutConfiguration;
import com.fcscs.cservice.domain.model.CountryView;
import com.fcscs.cservice.domain.model.ReservationConf;
import com.fcscs.cservice.domain.model.ReservationConfView;
import com.fcscs.cservice.domain.model.StateView;

@Repository
public interface CServiceCommonDao {

	List<CountryView> getCountryViewList(long propId);

	List<StateView> getStateViewList(long countryId);

	PropertyConfiguration getPropertyConf(long id);

	PropertyConfiguration getPropertyConf(long orgId, long propId);

	ReservationConf getRsvConf(long id);

	ReservationConf getRsvConf(long orgId, long propId);

	ReservationConfView getRsvConfView(long orgId, long propId);

	String getGSA(long propId);

	int getRsvSearchDays(long propId);

	int getBookSearchDays(long propId);

	List<Country> getCountryList(long propId);

	Country getCountry(long id);

	Country saveCountry(Country country);

	List<State> getStateList(long countryId);

	State getState(long id);

	State saveState(State state);

	List<Title> getTitleList(long propId);

	Title getTitle(long id);

	Title saveTitle(Title title);

	List<Language> getLanguageList(long propId);

	Language getLanguage(long id);

	Language saveLanguage(Language language);

	List<PaymentMethod> getPayMethodList(long propId);

	PaymentMethod getPayMethod(long id);

	PaymentMethod savePayMethod(PaymentMethod payMethod);

	List<Nationality> getNationalityList(long propId);

	Nationality getNationality(long id);

	Nationality saveNationality(Nationality nationality);

	List<RoomStatus> getRoomStatusList(long propId);

	RoomStatus getRoomStatus(long id);

	RoomStatus saveRoomStatus(RoomStatus roomStatus);

//	List<ReservationStatus> getRsvStatusList(long propId);

//	ReservationStatus getReservationStatus(long id);

//	ReservationStatus saveReservationStatus(ReservationStatus reservationStatus);

	boolean isCountryTaken(long propId, String country, Long id);

	boolean isStateTaken(long propId, long countryId, String state, Long id);

	boolean isTitleTaken(long propId, String title, Long id);

	boolean isLanguageTaken(long propId, String language, Long id);

	boolean isNationalityTaken(long propId, String nationality, Long id);

	boolean isPayMethodTaken(long propId, String method, Long id);

	boolean isRsvStatusTaken(long propId, String status, Long id);

	boolean isRoomStatusTaken(long propId, String status, Long id);

	boolean deleteCountry(Country country);
	
	void permDeleteCountry(Country country);
	
	boolean deleteState(State state);
	
	void permDeleteState(State state);
	
	boolean deleteTitle(Title title);
	
	void permDeleteTitle(Title title);
	
	boolean deleteLanguage(Language language);
	
	void permDeleteLanguage(Language language);
	
	boolean deleteNationality(Nationality nationality);
	
	void permDeleteNationality(Nationality nationality);
	
	boolean deletePayMethod(PaymentMethod method);
	
	void permDeletePayMethod(PaymentMethod method);
	
//	boolean deleteRsvStatus(ReservationStatus status);
	
//	void permDeleteRsvStatus(ReservationStatus status);
	
	boolean deleteRoomStatus(RoomStatus status);
	
	void permDeleteRoomStatus(RoomStatus status);
	
	PropertyConfiguration savePropertyConf(PropertyConfiguration conf);

	boolean isPropertyConfTaken(long orgId, long propId, Long id);

	String getCurrency(long propId);

	List<FieldEditability> getFieldEditability(long orgId, long propId, List<EditableCategoryEnum> categories);

	List<FieldEditability> updateFieldEditability(List<FieldEditability> fieldEditList);

	Map<Long, FieldEditability> getFieldEditability(Set<Long> ids);

	List<NotifDestination> getNotifDestinations(long orgId, long propId, NotifType[] types);

	Map<Long, NotifDestination> getNotifDestinations(Set<Long> ids);

	List<NotifDestination> updateNotifDestination(List<NotifDestination> notifDestList);

	List<NotifTemplate> getNotifTemplates(long orgId, long propId, TemplateType[] types);

	Map<Long, NotifTemplate> getNotifTemplates(Set<Long> ids);

	List<NotifTemplate> updateNotifTemplate(List<NotifTemplate> notifTmplList);

	CheckInConfiguration getCheckInConf(long id);

	CheckInConfiguration getCheckInConf(long orgId, long propId);

	CheckInConfiguration saveCheckInConf(CheckInConfiguration conf);

	CheckOutConfiguration getCheckOutConf(long id);

	CheckOutConfiguration getCheckOutConf(long orgId, long propId);

	CheckOutConfiguration saveCheckOutConf(CheckOutConfiguration conf);

	List<NotifDestination> getNotifDestinations(long orgId, long propId, NotifType type);

	List<NotifTemplate> getNotifTemplates(long orgId, long propId, TemplateType type);
	
	InterfaceConfiguration saveInterfaceConf(InterfaceConfiguration conf);
	
	InterfaceConfiguration getInterfaceConf(long orgId, long propId);
	
	InterfaceConfiguration getInterfaceConf(long id);
	
	List<IGuestUserView> getListIGuestUserView();
	//iGuest Authentication
		//AuthenticationConfig getLoginOption(int id);
		AuthenticationConfig getAuthen(long propId, long orgId);
//		AuthenticationConfig getPreCheckInEnable();
//		AuthenticationConfig getLevel();
		AuthenticationConfig SaveAuthen(AuthenticationConfig authen);
		//List<AuthenticationConfig> getAuthenList(long propId);
		boolean isAuthenTaken(long propId, int option, Long id);

		// Multi Language	
	Map<String, String> getLanguageMap();
	
	IGuestUserProfileView getIGuestUserProfileView();

	ExpressCheckInConfig saveExpressCheckInConfig(
			ExpressCheckInConfig expressCheckIn);

	ExpressCheckInConfig getExpressCheckInConfig(long id);

	ConstantsLanguageValue saveConstantsLanguageValue(ConstantsLanguageValue constants);


	List<ConstantsLanguageValue> getListConstantsLanguage(long propId,long orgId, String constant);

	HouseKeepingConfig saveHousepeepingConfig(
			HouseKeepingConfig currentHousekeepingConf);

	HouseKeepingConfig getHousekeepingConfig(long propertyId);

	InterfaceConfig getInterfaceConfig(Long propertyId);

	InterfaceConfig saveInterfaceConfig(InterfaceConfig currentInterConf);
	
}
